var ButtonControl = function () {
    function t() {}
    return t.init = function (t) {
        t.touchEnabled = !0, t.addEventListener(egret.TouchEvent.TOUCH_END, this.onMouseHandlerStage, this)
    }, t.onMouseHandlerStage = function () {
        0 == t.d && (t.fucker.y += 3, t.d = !0)
    }, t.fuck = function (t, e) {
        t.touchEnabled = !0, t.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onMouseHandler1, e), t.addEventListener(egret.TouchEvent.TOUCH_END, this.onMouseHandler2, e)
    }, t.dis = function (t) {
        t.alpha = .5
    }, t.can = function (t) {
        t.alpha = 1
    }, t.onMouseHandler1 = function (e) {
        t.d = !1, e = e.currentTarget, t.fucker = e, e.y -= 3
    }, t.onMouseHandler2 = function (e) {
        e = e.currentTarget, 0 == t.d && (e.y += 3, t.d = !0)
    }, t.createBitmapByName = function (t) {
        var e = new egret.Bitmap;
        return t = RES.getRes(t), e.texture = t, e
    }, t.showMsg = function (t, e, i, s, n) {
        "undefined" == typeof n && (n = !0);
        var h = new egret.TextField;
        e.addChild(h), h.size = 25, h.y = s, h.x = -40 + i, 0 > h.x && (h.x = 0), 350 < h.x && (h.x = 350), h.width = 150, h.height = 40, h.touchEnabled = !1, h.bold = !0, h.textAlign = "center", h.textColor = 0 == n ? 16711680 : 39168, h.text = t, h.stroke = 3, h.strokeColor = 16777215, egret.Tween.get(h).to({
            y: s - 50
        }, 800).call(function () {
            e.removeChild(h)
        }, this), console.log("tipppppp")
    }, t.d = !0, t.broken = !1, t.isMovie = !1, t
}();
ButtonControl.prototype.__class__ = "ButtonControl";
var __extends = this.__extends || function (t, e) {
        function i() {
            this.constructor = t
        }
        for (var s in e) e.hasOwnProperty(s) && (t[s] = e[s]);
        i.prototype = e.prototype, t.prototype = new i
    },
    TimeBar = function (t) {
        function e() {
            t.call(this), this.isPlaying = this.outTime = !1, this.canclick = !0, this.createView(), this.tk = new egret.Sound, this.tk = RES.getRes("tk")
        }
        return __extends(e, t), e.prototype.onTick = function (t) {
            this.isPlaying && (this.nowTimer = (new Date).getTime(), t = this.nowTimer - this.startTimer, this.infoText.text = (this.num - parseInt((t / 1e3).toString())).toString(), this.kuai.visible = 10 > parseInt(this.infoText.text) ? !0 : !1, 0 >= this.num - parseInt((t / 1e3).toString()) && this.over())
        }, e.prototype.addTime = function (t) {
            this.num += t
        }, e.prototype.createView = function () {
            this.time = ButtonControl.createBitmapByName("timeMc");
            var t = RES.getRes("hongdata"),
                e = RES.getRes("hong");
            this.kuai = new egret.MovieClip(t, e), this.kuai.gotoAndPlay("hong"), this.kuai.visible = !1, this.kuai.frameRate = 4, this.kuai.addEventListener("play", this.onPlay, this), t = RES.getRes("yangjingdata"), e = RES.getRes("yangjing"), this.yangjing = new egret.MovieClip(t, e), this.yangjing.gotoAndStop("yanjing"), this.yangjing.addEventListener("end", this.onEnd, this), this.yangjing.touchEnabled = !0, this.yangjing.frameRate = 5, this.addChild(this.kuai), this.addChild(this.time), this.addChild(this.yangjing), this.yangjing.scaleX = this.yangjing.scaleY = .85, this.kuai.x = 251.05, this.kuai.y = 17, this.time.x = 370, this.time.y = 652, this.yangjing.x = 73, this.yangjing.y = 676, this.infoText = new egret.TextField, this.infoText.text = "60", this.infoText.textColor = 16777215, this.infoText.size = 40, this.infoText.x = 405, this.infoText.y = 654, this.infoText.textAlign = "center", this.infoText.height = 44, this.infoText.width = 94, this.infoText.touchEnabled = !1, this.infoText.bold = !0, this.addChild(this.infoText)
        }, e.prototype.stop = function () {
            this.isPlaying = !1, this.removeEventListener(egret.Event.ENTER_FRAME, this.onTick, this)
        }, e.prototype.over = function () {
            this.time.visible = !1, this.infoText.visible = !1, this.kuai.visible = !1, this.stop(), this.dispatchEvent(new egret.Event("时间到"))
        }, e.prototype.start = function (t) {
            this.num = t, this.isPlaying = !0, this.startTimer = (new Date).getTime(), this.addEventListener(egret.Event.ENTER_FRAME, this.onTick, this), this.infoText.visible = !0
        }, e.prototype.onEnd = function () {
            this.canclick = !0, this.yangjing.gotoAndStop("yanjing")
        }, e.prototype.onPlay = function () {
            this.kuai.visible && this.tk.play()
        }, e
    }(egret.Sprite);
TimeBar.prototype.__class__ = "TimeBar";
var __extends = this.__extends || function (t, e) {
        function i() {
            this.constructor = t
        }
        for (var s in e) e.hasOwnProperty(s) && (t[s] = e[s]);
        i.prototype = e.prototype, t.prototype = new i
    },
    TipMc = function (t) {
        function e() {
            t.call(this), this.createView()
        }
        return __extends(e, t), e.prototype.createView = function () {
            var t = ButtonControl.createBitmapByName("tip");
            this.addChild(t), t.x = -150, t.y = -120, this.textField = new egret.TextField, this.addChild(this.textField), this.textField.size = 40, this.textField.y = -60, this.textField.x = -130, this.textField.width = 250, this.textField.height = 100, this.textField.bold = !0, this.textField.textAlign = "center", this.textField.textColor = 16711680, this.textField.text = "资源加载中..."
        }, e.prototype.setText = function (t) {
            this.textField.text = t
        }, e
    }(egret.Sprite);
TipMc.prototype.__class__ = "TipMc";
var CutTuControl = function () {
    function t() {}
    return t.initTu = function (e) {
        t.tu = new egret.SpriteSheet(RES.getRes(e)), t.name = e
    }, t.createPartBitmapByNum = function (e) {
        var i = new egret.Bitmap,
            s = (e - 1) % 14 * 70,
            n = 70 * parseInt(((e - 1) / 14).toString()),
            s = t.tu.createTexture(t.name, s, n, 70, 70);
        return i.texture = s, i.name = e.toString(), i
    }, t
}();
CutTuControl.prototype.__class__ = "CutTuControl";
var __extends = this.__extends || function (t, e) {
        function i() {
            this.constructor = t
        }
        for (var s in e) e.hasOwnProperty(s) && (t[s] = e[s]);
        i.prototype = e.prototype, t.prototype = new i
    },
    LoadingUI = function (t) {
        function e() {
            t.call(this), this.createView()
        }
        return __extends(e, t), e.prototype.createView = function () {
            this.textField = new egret.TextField, this.addChild(this.textField), this.textField.y = 320, this.textField.x = 120, this.textField.width = 480, this.textField.height = 100, this.textField.textColor = 16777215, this.textField.text = "资源加载中..."
        }, e.prototype.change = function () {
            this.textField.textColor = 0
        }, e.prototype.setProgress = function (t, e) {
            this.textField.text = "资源加载中..." + t + "/" + e
        }, e
    }(egret.Sprite);
LoadingUI.prototype.__class__ = "LoadingUI";
var PEIZHI_DATA = function () {
    function t() {}
    return t.placeData = [[2118.1, 259.65, 50, 50], [1957.25, 588.1, 55, 55], [1891.75, 566.6, 60, 60], [1888.3, 481.15, 65, 65], [1791.75, 580.6, 70, 70], [1959.75, 500.6, 50, 50], [1880.8, 398.25, 60, 60], [50.2, 196.5, 50, 50], [1805.3, 484.1, 55, 55], [1831.75, 285.65, 60, 60], [1960.25, 392.2, 65, 65], [1469.9, 343.5, 70, 70], [1700.7, 575.95, 50, 50], [1931.7, 307.65, 60, 60], [1639.35, 394.15, 65, 65], [2049.95, 392.6, 70, 70], [1461.3, 550.1, 55, 55], [1614.8, 585.6, 60, 60], [1176.4, 307.15, 65, 65], [1227.9, 386.6, 70, 70], [1674.8, 499.6, 60, 60], [1352.4, 310.15, 65, 65], [1453.8, 441.6, 70, 70], [1650.7, 295.7, 50, 50], [1720.25, 425.15, 55, 55], [1543.8, 400.65, 60, 60], [2033.05, 233.25, 70, 70], [1801.75, 360.6, 50, 50], [2124.95, 361.55, 60, 60], [1305.85, 489.65, 70, 70], [1303.35, 582.1, 65, 65], [1387, 596.6, 50, 50], [1303.85, 397.6, 60, 60], [1134.35, 517.1, 65, 65], [398.95, 302.65, 70, 70], [1376.9, 403.65, 50, 50], [1208.35, 591.1, 55, 55], [2050.5, 583.1, 65, 65], [1479.9, 115.95, 50, 50], [994.85, 585.6, 60, 60], [928.45, 311.15, 65, 65], [1107.35, 322.15, 55, 55], [1152.85, 443.65, 60, 60], [1049.35, 517.1, 65, 65], [735.95, 325.65, 70, 70], [876.95, 590.6, 50, 50], [965.35, 216.15, 55, 55], [769.95, 582.6, 60, 60], [135.2, 577.6, 70, 70], [796.95, 508.6, 50, 50], [587.95, 579.6, 60, 60], [714.45, 513.1, 65, 65], [886.95, 137.5, 70, 70], [721.95, 409.65, 50, 50], [1074, 227.65, 60, 60], [683.5, 204.15, 65, 65], [618, 521.6, 50, 50], [829.95, 421.65, 60, 60], [783.35, 126, 65, 65], [314.95, 287.65, 50, 50], [762.85, 228.65, 60, 60], [450.45, 115.45, 65, 65], [310.95, 215.65, 70, 70], [545.1, 357.65, 50, 50], [678.5, 111.15, 55, 55], [416.35, 454.1, 65, 65], [503, 575.6, 70, 70], [303.45, 354.15, 55, 55], [317.95, 576.6, 60, 60], [407.45, 578.1, 65, 65], [50.95, 569.6, 70, 70], [221.6, 214, 55, 55], [145.2, 465.6, 60, 60], [161.6, 133.15, 65, 65], [401.95, 202.65, 60, 60], [1946.25, 221, 65, 65], [229.1, 297.65, 70, 70], [1947.25, 120.45, 55, 55], [1746.75, 118.5, 60, 60], [1855.3, 133.15, 65, 65], [2041.8, 318.65, 50, 50], [142.7, 214.15, 55, 55], [1354.9, 208.5, 60, 60], [231.6, 568.45, 65, 65], [355.95, 125.65, 50, 50], [1499.5, 200.4, 55, 55], [1365.4, 123.45, 65, 65], [1285.95, 127.95, 70, 70], [1734.8, 323.65, 60, 60], [1551.8, 300.65, 50, 50], [1523.3, 485.1, 55, 55], [142.7, 293.2, 55, 55], [1384.8, 513.6, 60, 60], [2119.95, 134.95, 70, 70], [1600.25, 500.1, 55, 55], [1535.3, 585.1, 65, 65], [1217.9, 488.6, 50, 50], [1165.9, 225.65, 60, 60], [948.45, 514.1, 65, 65], [2118.1, 474.6, 50, 50], [1259.8, 287.65, 60, 60], [2036, 489.6, 70, 70], [981.35, 410.15, 55, 55], [1020.35, 318.15, 55, 55], [858.85, 223.65, 70, 70], [1432.4, 251.15, 55, 55], [858.35, 523.1, 55, 55], [1114, 591.6, 50, 50], [53.7, 476.15, 55, 55], [840.45, 307.15, 65, 65], [2033.75, 132.65, 50, 50], [620.5, 281, 55, 55], [647.5, 359.2, 65, 65], [976.35, 128.15, 65, 65], [450.45, 376.15, 65, 65], [488.95, 192.65, 70, 70], [500.5, 280.15, 65, 65], [139.2, 378.65, 70, 70], [52.7, 121, 55, 55], [369.95, 387.6, 60, 60], [578, 422.6, 50, 50], [589.4, 214.15, 55, 55], [508, 483.65, 60, 60], [336.45, 472.1, 55, 55], [43.95, 378.65, 50, 50], [563, 128.5, 60, 60], [1760.7, 205.5, 70, 70], [1429.9, 175.9, 50, 50], [1683.25, 205.95, 65, 65], [42.2, 290.65, 70, 70], [1584.1, 208.15, 55, 55], [1573.1, 126, 65, 65], [276.6, 123.15, 55, 55], [1658.75, 123.5, 50, 50], [1069, 125.95, 60, 60], [245.6, 419.15, 55, 55], [253, 487.6, 50, 50], [1168.4, 133.15, 65, 65], [1265, 208.5, 60, 60], [1847.8, 213.5, 50, 50], [651, 445.6, 50, 50], [674.45, 594.1, 55, 55], [898.85, 410.55, 50, 50], [2131.95, 573.6, 50, 50], [1071.5, 414.1, 65, 65]], t.wupindata = [["鱼", "眼睛", "动物", "尾巴", "食物"], ["鱼", "眼睛", "动物", "尾巴", "食物"], ["鱼", "眼睛", "动物", "尾巴", "食物"], ["鱼", "眼睛", "动物", "尾巴", "食物"], ["鱼", "眼睛", "动物", "尾巴", "食物"], ["手机"], ["手机"], ["鞋子"], ["鞋子"], ["鞋子"], ["鞋子"], ["手机"], ["手机", "叶子", "草莓", "水果", "甜的东西"], ["帽子"], ["帽子"], ["帽子"], ["帽子"], ["帽子"], ["帽子"], ["瓶子"], ["瓶子"], ["瓶子"], ["花", "叶子", "植物"], ["花", "叶子", "植物"], ["花", "叶子", "植物"], ["瓶子"], ["瓶子"], ["瓶子", "花", "叶子", "植物"], ["花", "叶子", "植物"], ["瓶子", "花", "叶子", "植物"], ["瓶子", "花", "叶子", "植物"], ["发光的东西", "灯泡"], ["发光的东西", "电器", "台灯", "星星"], ["发光的东西", "火", "蜡烛"], ["书本"], ["包包"], ["包包"], ["包包"], ["包包"], ["书本"], ["书本"], ["镜子", "爱心"], ["镜子"], ["镜子"], ["口红"], ["口红"], ["口红"], ["口红"], ["口红"], ["镜子", "口红"], ["包包"], ["瓶子"], ["瓶子"], ["瓶子"], ["瓶子"], ["礼物盒"], ["礼物盒"], ["礼物盒"], ["礼物盒"], ["礼物盒"], ["大便", "眼睛"], ["望远镜"], ["武器"], ["眼镜"], ["眼镜"], ["蔬菜", "叶子", "植物", "食物"], ["水桶"], ["浇水壶"], ["皇冠"], ["爱心"], ["鸡腿", "食物"], ["眼镜"], ["眼镜"], ["眼镜"], ["爱心", "字母"], ["袜子"], ["甜的东西", "食物"], ["甜的东西", "食物", "棒棒糖"], ["甜的东西", "食物", "水果", "叶子", "草莓"], ["食物", "餐具"], ["戒指"], ["武器"], ["食物", "水果", "叶子", "甜的东西"], ["武器"], ["戒指"], ["动物", "尾巴", "眼睛"], ["房子", "云"], ["月亮", "星星", "发光的东西"], ["乐器"], ["笔"], ["笔"], ["钥匙"], ["钥匙"], ["乐符"], ["乐符"], ["照相机"], ["照相机"], ["照相机"], ["照相机"], ["收音机"], ["收音机"], ["笔"], ["汽车", "交通工具"], ["交通工具"], ["汽车", "交通工具"], ["望远镜"], ["戒指"], ["地球仪"], ["梳子"], ["钥匙"], ["计算器"], ["爱心"], ["爱心"], ["手套", "星星"], ["甜的东西", "食物", "棒棒糖"], ["雨伞"], ["雨伞"], ["杯子"], ["奖杯"], ["奖杯"], ["发光的东西", "闪电"], ["星星", "发光的东西"], ["星星", "发光的东西"], ["火", "发光的东西"], ["餐具", "食物", "甜的东西"], ["尾巴", "食物", "动物", "眼睛"], ["星星", "篮子"], ["浇水壶"], ["云"], ["动物", "螃蟹", "食物", "眼睛"], ["武器"], ["数字"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["甜的东西", "食物", "爱心", "棒棒糖"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["字母"], ["火舞"], ["火舞"], ["书本"], ["书本"], ["数字"], ["数字"], ["数字"], ["时钟"], ["时钟"], ["时钟"], ["时钟"], ["时钟"], ["时钟"], ["皇冠"], ["水桶"], ["云"], ["火", "发光的东西"], ["火", "发光的东西"], ["火", "发光的东西"], ["篮子"], "篮子 水果 苹果 食物 甜的东西 香蕉".split(" "), ["房子"], ["房子", "星星", "发光的东西"], ["武器"], ["西瓜", "水果", "食物", "甜的东西"], ["西瓜", "水果", "食物", "甜的东西"], ["西瓜", "水果", "食物", "甜的东西"], "苹果 水果 眼睛 叶子 食物 甜的东西".split(" "), "苹果 水果 眼睛 叶子 食物 甜的东西".split(" "), "苹果 水果 眼睛 叶子 牙齿 食物 甜的东西 笑脸".split(" "), "苹果 水果 眼睛 叶子 食物 甜的东西".split(" "), ["苹果", "水果", "叶子", "食物", "甜的东西"], ["苹果", "水果", "叶子", "食物", "甜的东西"], ["水果", "叶子", "食物", "甜的东西"], "草莓 水果 眼睛 叶子 牙齿 食物 甜的东西 笑脸".split(" "), "草莓 水果 眼睛 叶子 牙齿 食物 甜的东西".split(" "), "草莓 水果 叶子 牙齿 食物 甜的东西 笑脸".split(" "), ["水果", "叶子", "食物", "甜的东西"], ["交通工具", "尾巴"], ["交通工具", "尾巴"], ["交通工具", "汽车"], ["交通工具", "汽车"], ["交通工具", "汽车"], ["交通工具", "自行车"], "草莓 水果 眼睛 叶子 食物 甜的东西 笑脸".split(" "), "草莓 水果 眼睛 叶子 食物 甜的东西".split(" "), ["树木", "植物", "叶子"], ["树木", "植物", "叶子"], ["树木", "植物", "叶子"], ["树木", "植物", "叶子"], ["树木", "植物", "叶子"], ["乐器"], ["爱心"], ["爱心"], ["爱心"], ["云"], ["云", "发光的东西", "闪电"], ["云"], ["乐器"], ["甜的东西", "食物", "水果", "叶子", "草莓"], ["武器"], ["电器", "发光的东西", "插头", "台灯"], ["发光的东西", "云"], ["武器"], ["乐器"], ["电器"], ["尾巴", "眼睛", "动物"], ["乐器"], ["电器", "插头"], ["电器"], ["植物", "水果", "叶子", "甜的东西", "食物"], ["自行车", "交通工具"]], t
}();
PEIZHI_DATA.prototype.__class__ = "PEIZHI_DATA";
var __extends = this.__extends || function (t, e) {
        function i() {
            this.constructor = t
        }
        for (var s in e) e.hasOwnProperty(s) && (t[s] = e[s]);
        i.prototype = e.prototype, t.prototype = new i
    },
    Sceen1 = function (t) {
        function e() {
            t.call(this), this.btn1s = new egret.Sprite, this.btn2s = new egret.Sprite, this.btn3s = new egret.Sprite, this.createView()
        }
        return __extends(e, t), e.prototype.createView = function () {
            var t = this.createBitmapByName("bg1"),
                e = this.createBitmapByName("startbtn");
            this.btn1s.addChild(e), this.btn1s.name = "开始", this.addChild(t), this.addChild(this.btn1s), this.btn1s.x = 159, this.btn1s.y = 480, ButtonControl.fuck(this.btn1s, this), this.btn1s.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onMouseHandler, this)
        }, e.prototype.onMouseHandler = function (t) {
            "开始" == t.currentTarget.name && this.dispatchEvent(new egret.Event("开始游戏"))
        }, e.prototype.onMouseHandler2 = function () {
        }, e.prototype.createBitmapByName = function (t) {
            var e = new egret.Bitmap;
            return t = RES.getRes(t), e.texture = t, e
        }, e.prototype.onShare = function () {
            var t = this.createBitmapByName("sharequan");
            t.touchEnabled = !0, t.alpha = .95, this.addChild(t), t.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onBacktoGame, this)
        }, e.prototype.onBacktoGame = function (t) {
            this.removeChild(t.target)
        }, e
    }(egret.Sprite);
Sceen1.prototype.__class__ = "Sceen1";
var __extends = this.__extends || function (t, e) {
        function i() {
            this.constructor = t
        }
        for (var s in e) e.hasOwnProperty(s) && (t[s] = e[s]);
        i.prototype = e.prototype, t.prototype = new i
    },
    Sceen2 = function (t) {
        function e() {
            t.call(this), this.mark = 1, this._number3 = this._number2 = this._number1 = 0, this._name3 = this._name2 = this._name1 = "", this._nameArr = [], this._highScore = this._score = 0, this.createView()
        }
        return __extends(e, t), e.prototype.showGame = function () {
            this.game = new Game(this), this.addChild(this.game), this.game.init(), this.timeBar = new TimeBar, this.timeBar.addEventListener("时间到", this.onOver, this), this.timeBar.start(60), this.tip = new TipMc, this.addChild(this.timeBar), this.timeBar.yangjing.addEventListener(egret.TouchEvent.TOUCH_TAP, this.eyeClick, this), this.createTextView(), localStorage.getItem("highScore") && (this._highScore = parseInt(localStorage.getItem("highScore"))), this.dateOne(), this.dateTwo(), this.dateThree(), this.upDateOne(), this.upDateTwo(), this.upDateThree(), this.upDateScore()
        }, e.prototype.eyeClick = function (t) {
            1 == this.timeBar.canclick && 6 <= this.timeBar.num && (this.timeBar.yangjing.gotoAndPlay("yanjing"), this.timeBar.canclick = !1, t = this.findName(), this.game.quickFind(t), this.timeBar.addTime(-10), ButtonControl.showMsg("时间减10秒", this.stage, this.timeBar.yangjing.x - 50, this.timeBar.yangjing.y - 50))
        }, e.prototype.findName = function () {
            var t = this._name1;
            return this._number1 <= this._number2 && this._number1 <= this._number3 ? t = this._name1 : this._number2 <= this._number1 && this._number2 <= this._number3 ? t = this._name2 : this._number3 <= this._number2 && this._number3 <= this._number1 && (t = this._name3), t
        }, e.prototype.upDateScore = function () {
            this.scoreTxt.text = "分数 " + this._score.toString(), this._score > this._highScore && (this._highScore = this._score, localStorage.setItem("highScore", this._highScore.toString()))
        }, e.prototype.dateOne = function () {
            var t = [];
            do t = this.game.choseObject(), this._number1 = t[0], this._name1 = t[1]; while (2 >= this._number1 || "时钟" == this._name1 || "火舞" == this._name1);
            this._number1 -= 2, 6 < this._number1 && (this._number1 = 6)
        }, e.prototype.dateTwo = function () {
            var t = [];
            do t = this.game.choseObject(), this._number2 = t[0], this._name2 = t[1]; while (2 >= this._number2 || "时钟" == this._name2 || "火舞" == this._name2);
            this._number2 -= 2, 6 < this._number2 && (this._number2 = 6)
        }, e.prototype.dateThree = function () {
            var t = [];
            do t = this.game.choseObject(), this._number3 = t[0], this._name3 = t[1]; while (2 >= this._number3 || "时钟" == this._name3 || "火舞" == this._name3);
            this._number3 -= 2, 6 < this._number3 && (this._number3 = 6)
        }, e.prototype.upDateOne = function () {
            this.number1.text = this._number1.toString(), this.name1.text = this._name1
        }, e.prototype.upDateTwo = function () {
            this.number2.text = this._number2.toString(), this.name2.text = this._name2
        }, e.prototype.upDateThree = function () {
            this.number3.text = this._number3.toString(), this.name3.text = this._name3
        }, e.prototype.upDateSortName = function () {
            for (var t = this.game._showNameArr, e = t.length - 1; e >= 0;) t.splice(e, 1), e--;
            this._number1 <= this._number2 && this._number1 <= this._number3 ? t = [this._name2, this._name3, this._name1] : this._number2 <= this._number1 && this._number2 <= this._number3 ? t = [this._name1, this._name3, this._name2] : this._number3 <= this._number2 && this._number3 <= this._number1 && (t = [this._name1, this._name2, this._name3]), this.game._showNameArr = t
        }, e.prototype.checkName = function (t) {
            if (this.upDateSortName(), t == this._name1) {
                if (this._number1--, this.upDateOne(), 0 >= this._number1) {
                    this.upDateNameArr(t), this.dateOne(), this.tip.setText(this._name1 + "\nX" + this._number1.toString()), this.addChild(this.tip), this.tip.x = this.stage.stageWidth / 2, this.tip.y = this.stage.stageHeight / 2, this.tip.scaleX = 0, this.tip.scaleY = 0, egret.Tween.get(this.tip).to({
                        scaleX: 1,
                        scaleY: 1
                    }, 200);
                    var e = this,
                        i = setInterval(function () {
                            e.tipSmall(), clearInterval(i)
                        }, 2e3)
                }
            } else t == this._name2 ? (this._number2--, this.upDateTwo(), 0 >= this._number2 && (this.upDateNameArr(t), this.dateTwo(), this.tip.setText(this._name2 + "\nX" + this._number2.toString()), this.addChild(this.tip), this.tip.x = this.stage.stageWidth / 2, this.tip.y = this.stage.stageHeight / 2, this.tip.scaleX = 0, this.tip.scaleY = 0, egret.Tween.get(this.tip).to({
                scaleX: 1,
                scaleY: 1
            }, 200), e = this, i = setInterval(function () {
                e.tipSmall(), clearInterval(i)
            }, 2e3))) : t == this._name3 && (this._number3--, this.upDateThree(), 0 >= this._number3 && (this.upDateNameArr(t), this.dateThree(), this.tip.setText(this._name3 + "\nX" + this._number3.toString()), this.addChild(this.tip), this.tip.x = this.stage.stageWidth / 2, this.tip.y = this.stage.stageHeight / 2, this.tip.scaleX = 0, this.tip.scaleY = 0, egret.Tween.get(this.tip).to({
                scaleX: 1,
                scaleY: 1
            }, 200), e = this, i = setInterval(function () {
                e.tipSmall(), clearInterval(i)
            }, 2e3)))
        }, e.prototype.upDateNameArr = function (t) {
            for (var e = this.game._showNameArr, i = e.length - 1; i >= 0;) {
                if (e[i] == t) {
                    e.splice(i, 1);
                    break
                }
                i--
            }
        }, e.prototype.createView = function () {
            var t = ButtonControl.createBitmapByName("bg2");
            this.addChild(t), this._score = 0
        }, e.prototype.onOver = function (t) {
            this.game.over(), t = ButtonControl.createBitmapByName("overbg"), this.addChild(t), t.touchEnabled = !0, this.infoText = new egret.TextField, this.infoText.text = this._score.toString(), this.infoText.textColor = 16729088, this.infoText.size = 100, this.infoText.x = 119.05, this.infoText.y = 244, this.infoText.textAlign = "center", this.infoText.height = 127, this.infoText.width = 261, this.infoText.touchEnabled = !1, this.infoText.strokeColor = 16777215, this.infoText.bold = !0, this.infoText.stroke = 3, this.addChild(this.infoText), t = ButtonControl.createBitmapByName("zailaibtn");
            var e = ButtonControl.createBitmapByName("xuanyaobtn"),
                i = ButtonControl.createBitmapByName("fenxiangbtn"),
                s = ButtonControl.createBitmapByName("more");
            s.width = 155, s.height = 58, this.addChild(t), this.addChild(e), this.addChild(i), this.addChild(s), i.x = 77, i.y = 474, t.x = 280, t.y = 550, e.x = 77, e.y = 550, s.x = 280, s.y = 474;
            var n = 1,
                h = "";
            10 > this._score ? (n = 1, h = "近视眼") : 20 > this._score ? (n = 2, h = "水汪汪大眼睛") : 35 > this._score ? (n = 3, h = "炯炯有神") : 50 > this._score ? (n = 4, h = "电子监视器") : 100 > this._score ? (n = 5, h = "显微镜") : 150 > this._score ? (n = 6, h = "哈雷望眼镜") : 300 > this._score && (n = 7, h = "火眼金睛"), console.log(n), n = ButtonControl.createBitmapByName("chenghao" + n.toString()), this.addChild(n), n.x = (this.stage.stageWidth - n.width) / 2, n.y = 358, ButtonControl.fuck(t, this), ButtonControl.fuck(e, this), ButtonControl.fuck(i, this), ButtonControl.fuck(s, this), e.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onPai, this), t.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onZailai, this), i.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onFen, this), s.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onMore, this)
        }, e.prototype.onMore = function () {
        }, e.prototype.onFen = function () {
        }, e.prototype.onFuli = function () {
            this.dispatchEvent(new egret.Event("开始加载"))
        }, e.prototype.onPai = function () {
        }, e.prototype.onZailai = function () {
            this.dispatchEvent(new egret.Event("再来"))
        }, e.prototype.tipBig1 = function () {
            console.log("da"), clearInterval(this.mark), egret.Tween.get(this.tip).to({
                scaleX: 0,
                scaleY: 0
            }, 200).call(this.tipSmall, this)
        }, e.prototype.tipBig = function () {
            var t = this,
                e = setInterval(function () {
                    t.tipSmall(), clearInterval(e)
                }, 2e3)
        }, e.prototype.tipSmall = function () {
            this.removeChild(this.tip), this.timeBar.addTime(1), ButtonControl.showMsg("时间增加1秒", this.stage, this.timeBar.time.x, this.timeBar.time.y), this.upDateOne(), this.upDateTwo(), this.upDateThree()
        }, e.prototype.createTextView = function () {
            this.number1 = new egret.TextField, this.number1.textColor = 16777215, this.number1.size = 35, this.number1.x = 127, this.number1.y = 10, this.number1.textAlign = "center", this.number1.height = 40, this.number1.width = 40, this.number1.touchEnabled = !1, this.number1.bold = !0, this.addChild(this.number1), this.number2 = new egret.TextField, this.number2.textColor = 16777215, this.number2.size = 35, this.number2.x = 294, this.number2.y = 10, this.number2.textAlign = "center", this.number2.height = 40, this.number2.width = 40, this.number2.touchEnabled = !1, this.number2.bold = !0, this.addChild(this.number2), this.number3 = new egret.TextField, this.number3.textColor = 16777215, this.number3.size = 35, this.number3.x = 460, this.number3.y = 10, this.number3.textAlign = "center", this.number3.height = 40, this.number3.width = 40, this.number3.touchEnabled = !1, this.number3.bold = !0, this.addChild(this.number3), this.name1 = new egret.TextField, this.name1.textColor = 16777215, this.name1.size = 25, this.name1.x = 2, this.name1.y = 12, this.name1.height = 32, this.name1.width = 132, this.name1.touchEnabled = !1, this.name1.textAlign = egret.HorizontalAlign.RIGHT, this.name1.bold = !0, this.addChild(this.name1), this.name2 = new egret.TextField, this.name2.textColor = 16777215, this.name2.size = 25, this.name2.x = 169, this.name2.y = 12, this.name2.height = 32, this.name2.width = 132, this.name2.touchEnabled = !1, this.name2.textAlign = egret.HorizontalAlign.RIGHT, this.name2.bold = !0, this.addChild(this.name2), this.name3 = new egret.TextField, this.name3.textColor = 16777215, this.name3.size = 25, this.name3.x = 332, this.name3.y = 12, this.name3.height = 32, this.name3.width = 132, this.name3.touchEnabled = !1, this.name3.textAlign = egret.HorizontalAlign.RIGHT, this.name3.bold = !0, this.addChild(this.name3), this.scoreTxt = new egret.TextField, this.scoreTxt.textColor = 16777215, this.scoreTxt.size = 38, this.scoreTxt.x = 164, this.scoreTxt.y = 657, this.scoreTxt.height = 40, this.scoreTxt.width = 153, this.scoreTxt.touchEnabled = !1, this.scoreTxt.bold = !0, this.addChild(this.scoreTxt), this.scoreTxt.text = "分数  "
        }, e
    }(egret.Sprite);
Sceen2.prototype.__class__ = "Sceen2";
var __extends = this.__extends || function (t, e) {
        function i() {
            this.constructor = t
        }
        for (var s in e) e.hasOwnProperty(s) && (t[s] = e[s]);
        i.prototype = e.prototype, t.prototype = new i
    },
    Game = function (t) {
        function e(e) {
            t.call(this), this.arr = [], this._mcArr = [], this._newMcArr = [], this._nameArr = [], this._showNameArr = [], this._allNameArr = [], this.xxOld = this.xx = this.nandu = 0, this.isyidong = this.isDown = !1, this.sceen = e, this.show(), this.rs = new egret.Sound, this.rs = RES.getRes("rs"), this.ws = new egret.Sound, this.ws = RES.getRes("ws"), e = RES.getRes("cuowudata");
            var i = RES.getRes("cuowu");
            this.cuowu = new egret.MovieClip(e, i), this.cuowu.addEventListener("end", this.onEnd, this), this.cuowu.gotoAndStop("cuowu"), this.cuowu.frameRate = 18
        }
        return __extends(e, t), e.prototype.onEnd = function () {
            this.cuowu.gotoAndStop("cuowu"), this.removeChild(this.cuowu)
        }, e.prototype.onMouseHandlerOn = function (t) {
            this.isyidong = !1, this.isDown = !0, this.xx = t._stageX, this.xxOld = this.x
        }, e.prototype.onMouseHandlerMove = function (t) {
            this.isDown && (t = this.xx - t._stageX, this.x = this.xxOld - t, 10 < Math.abs(t) && (this.isyidong = !0)), 100 < this.x && (this.x = 100), this.x < -this.width + this.stage.stageWidth - 100 && (this.x = -this.width + this.stage.stageWidth - 100)
        }, e.prototype.onMouseHandlerOut = function () {
            this.isDown = !1, 0 < this.x && (this.x = 0), this.x < -this.width + this.stage.stageWidth - 10 && (this.x = -this.width + this.stage.stageWidth - 10), console.log("songkai")
        }, e.prototype.show = function () {
            this.arr = [], this._mcArr = [], this._newMcArr = [], this._showNameArr = [], this._allNameArr = [], this._nameArr = [], CutTuControl.initTu("wupin");
            for (var t = 1; 260 > t; t++) this.arr.push(CutTuControl.createPartBitmapByNum(t));
            this.createAllMc(), this._circle = ButtonControl.createBitmapByName("yuan")
        }, e.prototype.chuli = function () {
            for (var t = 0; t < PEIZHI_DATA.placeData.length; t++) this.arr[t].width = PEIZHI_DATA.placeData[t][2], this.arr[t].height = PEIZHI_DATA.placeData[t][3], this.arr[t].x = PEIZHI_DATA.placeData[t][0] - .5 * this.arr[t].width, this.arr[t].y = PEIZHI_DATA.placeData[t][1] - .5 * this.arr[t].height, this.addChild(this.arr[t])
        }, e.prototype.init = function () {
            console.log(this.stage), this.stage.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onMouseHandlerOn, this), this.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE, this.onMouseHandlerMove, this), this.stage.addEventListener(egret.TouchEvent.TOUCH_END, this.onMouseHandlerOut, this)
        }, e.prototype.over = function () {
            this.stage.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onMouseHandlerOn, this), this.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE, this.onMouseHandlerMove, this), this.stage.removeEventListener(egret.TouchEvent.TOUCH_END, this.onMouseHandlerOut, this)
        }, e.prototype.createAllMc = function () {
            var t = PEIZHI_DATA.wupindata.length;
            console.log(t, "aaaa");
            for (var e = 0; e < PEIZHI_DATA.placeData.length;) {
                var i = Math.floor(t * Math.random());
                this.createMc(i, PEIZHI_DATA.placeData[e][0], PEIZHI_DATA.placeData[e][1], PEIZHI_DATA.placeData[e][2], PEIZHI_DATA.placeData[e][3]), e++
            }
        }, e.prototype.createMc = function (t, e, i, s, n) {
            t = CutTuControl.createPartBitmapByNum(t + 1), t.width = s, t.height = n, t.x = e - .5 * t.width, t.y = i - .5 * t.height, this._mcArr.push(t), t.touchEnabled = !0, t.addEventListener(egret.TouchEvent.TOUCH_TAP, this.mouseUp, this), this.addChild(t)
        }, e.prototype.getdata = function (t) {
            for (var e = 0; e < this.arr.length; e++)
                if (t.name == this.arr[e].name) return console.log(PEIZHI_DATA.wupindata[e]), PEIZHI_DATA.wupindata[e];
            return null
        }, e.prototype.mouseUp = function (t) {
            var e = [],
                i = 0,
                s = 0,
                e = 0,
                n = !1,
                h = "xxx";
            if (1 != this.isyidong) {
                this._circle && this._circle.parent && this.removeChild(this._circle);
                for (var r = this._showNameArr.length - 1; r >= 0;) {
                    for (e = this.getdata(t.target), i = e.length - 1; i >= 0;) {
                        if (this._showNameArr[r] == e[i] || "时钟" == e[i] || "火舞" == e[i])
                            for (n = !0, h = e[i], this.sceen && "时钟" != [i] && "火舞" != [i] && this.sceen.checkName(this._showNameArr[r]), s = this._mcArr.length - 1; s >= 0;) {
                                if (this._mcArr[s].x == t.target.x && this._mcArr[s].y == t.target.y) {
                                    this._mcArr[s].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.mouseUp, this), console.log("eeee"), this.tmpMc = this._mcArr[s], this.tmpx = this._mcArr[s].x, this.tmpy = this._mcArr[s].y, this.tmpW = this._mcArr[s].width, this.tmpH = this._mcArr[s].height, egret.Tween.get(this._mcArr[s]).to({
                                        scaleX: 0,
                                        scaleY: 0,
                                        x: this._mcArr[s].x + .5 * this._mcArr[s].width,
                                        y: this._mcArr[s].y + .5 * this._mcArr[s].height
                                    }, 150).call(this.onComplete, this), this._mcArr.splice(s, 1);
                                    break
                                }
                                s--
                            }
                        if (n) break;
                        i--
                    }
                    if (n) break;
                    r--
                }
                n ? (console.log("对了"), this.rs.play(), "时钟" == h ? e = .8 > Math.random() ? 1 + Math.floor(2 * Math.random()) : 3 + Math.floor(3 * Math.random()) : "火舞" == h ? e = 5 : (this.sceen._score++, this.sceen.upDateScore(), e = 1), this.sceen.timeBar.addTime(e), ButtonControl.showMsg("时间加" + e.toString() + "秒", this.stage, this.tmpx + this.x, this.tmpy)) : (this.ws.play(), this.cuowu.gotoAndPlay("cuowu"), this.addChild(this.cuowu), console.log("错了"), this.sceen.timeBar.addTime(-6), ButtonControl.showMsg("时间减6秒", this.stage, t.target.x + this.x, t.target.y, !1), this.cuowu.x = t.target.x + .5 * t.target.width, this.cuowu.y = t.target.y + .5 * t.target.height)
            }
        }, e.prototype.choseObject = function () {
            for (var t = 0, e = [], i = !1, s = 0, n = 0, t = [], e = 0, i = !1, s = 0, t = this._newMcArr.length - 1; t >= 0;) this._newMcArr.splice(t, 1), t--;
            if (this._newMcArr = this._newMcArr.concat(this._mcArr), 0 != this._showNameArr.length)
                for (t = this._newMcArr.length - 1; t >= 0;) {
                    for (e = PEIZHI_DATA.wupindata[parseInt(this._newMcArr[t].name) - 1], i = !1, s = this._showNameArr.length - 1; s >= 0;) {
                        for (n = e.length - 1; n >= 0;) {
                            if (this._showNameArr[s] == e[n]) {
                                i = !0, this._newMcArr.splice(t, 1);
                                break
                            }
                            n--
                        }
                        if (i) break;
                        s--
                    }
                    t--
                }
            for (t = this._nameArr.length - 1; t >= 0;) this._nameArr.splice(t, 1), t--;
            for (t = this._allNameArr.length - 1; t >= 0;) this._allNameArr.splice(t, 1), t--;
            for (n = this._newMcArr.length - 1; n >= 0;) {
                for (t = PEIZHI_DATA.wupindata[parseInt(this._newMcArr[n].name) - 1], this._allNameArr = this._allNameArr.concat(t), e = t.length - 1; e >= 0;) {
                    for (i = !1, s = this._nameArr.length - 1; s >= 0;) {
                        if (t[e] == this._nameArr[s]) {
                            i = !0;
                            break
                        }
                        s--
                    }
                    0 == i && this._nameArr.push(t[e]), e--
                }
                n--
            }
            for (i = Math.floor(this._nameArr.length * Math.random()), t = this._nameArr[i], e = 0, this._showNameArr.push(this._nameArr[i]), i = this._allNameArr.length - 1; i >= 0;) this._allNameArr[i] == t && e++, i--;
            return i = [], i.push(e, t), i
        }, e.prototype.onComplete = function (t) {
            t = Math.floor(PEIZHI_DATA.wupindata.length * Math.random()), this.createMc(t, this.tmpx + .5 * this.tmpW, this.tmpy + .5 * this.tmpH, this.tmpW, this.tmpH), t = this._mcArr[this._mcArr.length - 1].scaleX;
            var e = this._mcArr[this._mcArr.length - 1].scaleY;
            this._mcArr[this._mcArr.length - 1].x += .5 * this._mcArr[this._mcArr.length - 1].width, this._mcArr[this._mcArr.length - 1].y += .5 * this._mcArr[this._mcArr.length - 1].height, this._mcArr[this._mcArr.length - 1].scaleX = 0, this._mcArr[this._mcArr.length - 1].scaleY = 0, egret.Tween.get(this._mcArr[this._mcArr.length - 1]).to({
                x: this.tmpx,
                y: this.tmpy,
                scaleX: t,
                scaleY: e
            }, 200), this.removeChild(this.tmpMc)
        }, e.prototype.quickFind = function (t) {
            for (var e = [], i = 0, s = this._mcArr.length - 1; s >= 0;) {
                for (e = PEIZHI_DATA.wupindata[parseInt(this._mcArr[s].name) - 1], i = e.length - 1; i >= 0;) {
                    if (t == e[i]) return this._mcArr[s].width > this._mcArr[s].height ? (this._circle.width = this._mcArr[s].width + 40, this._circle.height = this._mcArr[s].width + 40) : (this._circle.width = this._mcArr[s].height + 40, this._circle.height = this._mcArr[s].height + 40), this._circle.x = this._mcArr[s].x - 20, this._circle.y = this._mcArr[s].y - 20, this.addChild(this._circle), this.x = 320 - this._mcArr[s].x, 0 < this.x && (this.x = 0), void(this.x < -this.width + this.stage.stageWidth && (this.x = -this.width + this.stage.stageWidth));
                    i--
                }
                s--
            }
        }, e
    }(egret.Sprite);
Game.prototype.__class__ = "Game";
var __extends = this.__extends || function (t, e) {
        function i() {
            this.constructor = t
        }
        for (var s in e) e.hasOwnProperty(s) && (t[s] = e[s]);
        i.prototype = e.prototype, t.prototype = new i
    },
    ZhaoNiMei = function (t) {
        function e() {
            t.call(this), this.mark1 = 0, this.arr = [], this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this)
        }
        return __extends(e, t), e.prototype.onAddToStage = function () {
            this.loadingView = new LoadingUI, this.stage.addChild(this.loadingView), RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this), RES.loadConfig("resource/resource.json", "resource/"), ButtonControl.init(this)
        }, e.prototype.onConfigComplete = function () {
            RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this), RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this), RES.addEventListener(RES.ResourceEvent.GROUP_PROGRESS, this.onResourceProgress, this), RES.loadGroup("changjing1")
        }, e.prototype.onResourceLoadComplete = function (t) {
            "changjing1" == t.groupName ? (console.log("changjing1"), this.stage.removeChild(this.loadingView), this.createGameScene1()) : "changjing2" == t.groupName && (console.log("changjing2"), this.stage.removeChild(this.loadingView), this.createGameScene2(), RES.loadGroup("sucai3"))
        }, e.prototype.onResourceProgress = function (t) {
            this.loadingView.setProgress(t.itemsLoaded, t.itemsTotal)
        }, e.prototype.createGameScene1 = function () {
            this.sceen1 = new Sceen1, this.addChild(this.sceen1), this.sceen1.addEventListener("开始游戏", this.onPlayWhat, this)
        }, e.prototype.createGameScene2 = function () {
            this.sceen2 = new Sceen2, this.addChild(this.sceen2), this.sceen2.addEventListener("再来", this.onBackMenu, this), this.sceen2.addEventListener("开始加载", this.onJiaZai, this), console.log("fffff"), this.sceen2.showGame()
        }, e.prototype.onJiaZai = function () {}, e.prototype.onBackMenu = function () {
            this.removeChild(this.sceen2), this.createGameScene1()
        }, e.prototype.onPlayWhat = function () {
            this.removeChild(this.sceen1), this.sceen2 ? (console.log("here"), this.createGameScene2()) : (this.stage.addChild(this.loadingView), RES.loadGroup("changjing2"))
        }, e
    }(egret.DisplayObjectContainer);
ZhaoNiMei.prototype.__class__ = "ZhaoNiMei";